import riskClient from "./riskClient";

// 人员信息查询
export const queryUserInfo = ({ params, success, failure }) => {
  return riskClient.post({
    url: 'api/permission/queryUserInfo',
    params,
    success,
    failure,
  })
}

// 人员权限配置保存
export const saveOrUpdateUserRole = ({ params, success, failure }) => {
  return riskClient.post({
    url: 'api/permission/saveOrUpdateUserRole',
    params,
    success,
    failure,
  })
}

// 获取全部机构树
export const queryCfgProUnits = async ( params ) => {
  return await riskClient.getAsync({
    url: 'api/common/queryCfgProUnits',
    params,
    restfull: false
  })
}

// 人员信息导出
export const exportUserInfo = async ({ params, success, failure }) => {
  return await riskClient.post({
    url: 'auth/exportUserInfo',
    params,
    success,
    failure,
  })
}
